<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加图片</title>
    <script src="../js/jquery-2.1.1.min.js"></script>
    <script src="../js/base.js"></script>
    <script src="../js/vue.min.js"></script>
    <script src="add_img.js"></script>
</head>
<body>
<div id="commodity_img">
    <button class="button" onclick="go_commodity_list()">返回列表</button>
    <!--<form action="/commodity/create_img" method="post" enctype="multipart/form-data">
        <input type="file" name="img">
        <input id="goods_id" name="goods_id" type="hidden">
        <button type="submit">上传</button>
    </form>-->
    <!--<form action="/commodity/create_imgs" method="post" enctype="multipart/form-data">-->
    <input id="goods_id" name="goods_id" type="hidden">
    <input type="file" name="img" id="upload">
    <button onclick="img_save()">上传</button>
    <!--</form>-->
    <div>
        <span v-for="item in commodity_imgs">
            <img :src="item.img_url">
            <button @click="delete_img(item.img_id)">删除</button>
        </span>
    </div>
</div>
</body>
</html>